package com.example.mybatis_plus_use.Exception;

public class CustomException extends RuntimeException {
    private Integer code;
    // 构造函数
    public CustomException(String message, Integer code) {
        super(message);//父类的构造函数
        this.code = code;
    }

    public CustomException(String message) {
        super(message);//父类的构造函数

    }

    public CustomException() {//无参构造函数
    }

    @Override
    public String getMessage() {
        return super.getMessage();
    }
}